import http from '@/utils/http'

const CustRelationManage = {

  /**
   * 省关系维护
   * @param {*} params
   * @returns
   */
  //获取省列表
  async getProvinceList(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/getProvinceList`,
      params: params,
      method: 'GET'
    })
    return result;
  },
  //获取市列表
  async getLanList(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/getLanList`,
      params: params,
      method: 'GET'
    })
    return result;
  },
  //查询省客户
  async getCusRelList(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/getCusRelList`,
      params: params,
      method: 'GET'
    })
    return result;
  },
  //添加映射关系
  async custRelMaintain(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/custRelMaintain`,
      data: params,
      method: 'POST'
    })
    return result;
  },
  // 初始化下拉框列表
  async initValue(params){
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/getBasicsdata`,
      params: params,
      method:'GET'
  })
     return result;
  },
  //获取集团客户列表
  async getCustList(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/getCustList`,
      params: params,
      method: 'GET'
    })
    return result;
  },
  //获取省客户列表
  async getCustProList(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/getCustProList`,
      params: params,
      method: 'GET'
    })
    return result;
  },
   //同步客户到省
   async custAutoSynch(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/custAutoSynch`,
      data: params,
      method: 'POST'
    })
    return result;
  },
  //获取客户名称
  async getCustCommon(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/getCustCommon`,
      params: params,
      method: 'GET'
    })
    return result;
  },

}
export default CustRelationManage
